package com.weixiao.utils;


/**
 * @author: 韩诚
 * @date 2022/10/23 12:40
 */
public class CommonException extends RuntimeException {

    private static final long serialVersionUID = 1L;
    public Exception detailException = null;
    private Integer errcode;

    public CommonException(String message) {
        super(message);
    }


    public CommonException(String message, Exception exception) {
        super(message);
        this.detailException = exception;
    }


    public CommonException(int errcode, String message) {
        super(message);
        this.errcode = errcode;
    }

    public Integer getErrcode() {
        return errcode;
    }

    public void setErrcode(Integer errcode) {
        this.errcode = errcode;
    }

    @Override
    public String toString() {
        return "[errcode=" + errcode + "]" + "[detailMessage=" + this.getMessage() + "]";
    }

}
